﻿// -------------------------------------------------------------------------
//    @FileName         :    NFHealthGamePart.h
//    @Author           :    gaoyi
//    @Date             :    2025/1/7
//    @Email            :    445267987@qq.com
//    @Module           :    NFHealthGamePart
//
// -------------------------------------------------------------------------

#pragma once

#include <NFLogicCommon/NFLogicShmTypeDefines.h>
#include "NFPart.h"
#include "proto_common_others.nanopb.h"

class NFHealthGamePart : public NF_OBJECT_TEMPLATE_MACRO(NFHealthGamePart, EOT_LOGIC_PART_MIN_ID + PART_HEALTHGAME, NFPart)
public:
    NFHealthGamePart();
    
    ~NFHealthGamePart() override;
    
    int CreateInit();
    int ResumeInit();
public:
    /**
     * @brief 从数据库中加载数据
     * @param data
     * @return
     */
    int LoadFromDB(const proto_ff::tbRoleDetail *pDBData) override;

    /**
     * @brief 从配置中初始化数据
     * @return
     */
    int InitConfig(proto_ff::tbRoleDetail *pDbData, const RoleOne &stRoleOne) override;

    /**
     * @brief 存储DB部件入口
     * @param proto
     * @return
     */
    int SaveDB(proto_ff::tbRoleDetail *pDBData) override;
public:
    virtual int MakePlayerDataCS(proto_ff::Proto_CSGetRoleRsp* pCSGetRoleRsp) override;
    virtual int MakeCityPlayerData(proto_ff::CityRoleInfo* pGCCityRoleInfo) override;
private:
    HealthGameRemindInfo m_stData;
};
